package com.m1book.domain;

import static org.junit.Assert.assertNotNull;

import org.junit.Before;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import com.m1book.domain.auth.MiserDetailsService;
import com.m1book.repositories.book.ABookRepository;
import com.m1book.repositories.book.BookRepository;
import com.m1book.repositories.trace.RegisterABookTraceRepository;
import com.m1book.repositories.user.MiserRepository;

@ContextConfiguration("classpath:/META-INF/spring/tests-context.xml")
@RunWith(SpringJUnit4ClassRunner.class)
public class ConfigurationPrepared {
	
	@Autowired
	protected M1BookService m1bookerService;
	
	@Autowired
	protected BookRepository bookRepository;
	
	@Autowired
	protected MiserRepository miserRepository;
	
	@Autowired
	protected ABookRepository abookRepository;
	
	@Autowired
	protected RegisterABookTraceRepository registerABookTraceRepository;
	
	@Autowired
	protected MiserDetailsService miserDetailsService;

	@Before
	public void testApplicationContext() throws Exception {
		assertNotNull(miserRepository);
		assertNotNull(bookRepository);
		assertNotNull(m1bookerService);
		assertNotNull(abookRepository);
		assertNotNull(registerABookTraceRepository);
		assertNotNull(miserDetailsService);
	}
	
}
